package com.zb.Service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zb.Service.ContactService;
import com.zb.entity.Contact;
import com.zb.mapper.ContactMapper;


@Component("ContactService")
public class ContactServiceImpl implements ContactService{
	@Autowired
	private ContactMapper contmap;
	
	public List<Contact> getContactSelf(int uid) {
		return contmap.getContactSelf(uid);
	}

	public int addContact(Contact cota) {
		return contmap.addContact(cota);
	}

	public int deleteContact(int shid) {
		Map<String, Integer> map = new HashMap<String, Integer>();
		map.put("shid", shid);
		return contmap.deleteContact(map);
	}
}